//
//  ZCNavViewController.m
//  03地图定位
//
//  Created by 张聪 on 16/7/22.
//  Copyright © 2016年 张聪. All rights reserved.
//

#import "ZCNavViewController.h"
#import "ViewController.h"
#import "Masonry.h"

@interface ZCNavViewController ()

@end

@implementation ZCNavViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor greenColor];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
    viewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(didNavVc)];
    
    [super pushViewController:viewController animated:animated];
    
    
}

- (void)didNavVc {
    
    [self.navigationController popToRootViewControllerAnimated:YES];
    
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
